package elsa.bootmapper;

import java.util.Date;
import java.util.List;

import elsa.bean.ScsPermission;
import elsa.bean.ScsRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import elsa.bean.ScsUser;

@Mapper
public interface UserMapper{

	/*
	 *  用户操作
	 */
	//获取用户角色
	@Select("select role from scs_role where userid = #{userid,jdbcType=VARCHAR}")
	ScsRole findRole(String userid);

	//获取用户权限
	@Select("select * from scs_permission where role = #{role,jdbcType=VARCHAR}")
	List<ScsPermission> findPermission(String role);

	//新增用户角色
	@Insert("insert into scs_role(userid, role) values (#{userid,jdbcType=VARCHAR}, #{role,jdbcType=VARCHAR})")
	void saveRole(ScsRole scsRole);

	//删除用户角色
	@Delete("delete from scs_role where userid = #{userid,jdbcType=VARCHAR}")
	void deleteRole(String userid);

	//新建用户
	@Insert("insert into scs_user(username, password, userid, latesttime, state) values"
			+ "(#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, #{latesttime}, #{state,jdbcType=VARCHAR})")
	void saveUser(ScsUser scsUser);

	//更新用户
	@Update("update scs_user set username = #{username,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}")
	void updateUser(ScsUser scsUser);

	//查询用户(用户名)
	@Select("select username, password, userid, latesttime, state from scs_user where username = #{username}")
	ScsUser findByUsername(String username);

	//查询用户(身份证号)
	@Select("select username, password, userid, latesttime, state from scs_user where userid = #{userid}")
	ScsUser findByUserid(String userid);

	//删除用户
	@Delete("delete from scs_user where userid = #{userid,jdbcType=VARCHAR}")
	void delete(String userid);

	//禁用用户
	@Update("update scs_user set state = '禁用' where userid = #{userid,jdbcType=VARCHAR} and state = '正常'")
	void forbidUser(String userid);

	//恢复用户
	@Update("update scs_user set state = '正常' where userid = #{userid,jdbcType=VARCHAR} and state = '禁用'")
	void renewUser(String userid);

	//修改密码
	@Update("update scs_user set password=#{password,jdbcType=VARCHAR} where username=#{username,jdbcType=VARCHAR} and state = '正常'")
	void updatePsw(ScsUser scsUser);

	//重置密码
	@Update("update scs_user set password=#{password,jdbcType=VARCHAR} where userid=#{userid,jdbcType=VARCHAR} and state = '正常'")
	void resetPsw(@Param("password") String password, @Param("userid") String userid);

	//更新登录时间
	@Update("update scs_user set latesttime = #{latesttime} where username = #{username,jdbcType=VARCHAR} and password = #{password,jdbcType=VARCHAR}")
	void updateLatestTime(@Param("latesttime") Date latesttime, @Param("username") String username, @Param("password") String password);


	/*
	 * 管理员操作
	 */
	//查询管理员条数(所有)
	@Select("select count(*) from user_admin_view")
	int findGlyCount();

	//查询管理员条数 (用户名  模糊查询)
	@Select("select count(*) from user_admin_view where username like CONCAT(CONCAT('%', #{username}), '%')")
	int findGlyCountByUsername(String username);

	//查询管理员条数(姓名  模糊查询)
	@Select("select count(*) from user_admin_view where name like CONCAT(CONCAT('%', #{name}), '%')")
	int findGlyCountByName(String name);

	//查询管理员列表
	@Select("select name, sex, username, userid, rgsttime, state from user_admin_view order by rgsttime desc")
	List<ScsUser> findAllGly();

	//查询管理员用户(用户名)
	@Select("select name, sex, username, userid, rgsttime, state from user_admin_view where username = #{username,jdbcType=VARCHAR}")
	ScsUser findGlyUsername(String username);

	//查询管理员用户(用户名  模糊查询)
	@Select("select name, sex, username, userid, rgsttime, state from user_admin_view where username like CONCAT(CONCAT('%', #{username}), '%') order by rgsttime desc")
	List<ScsUser> findGlyByUsername(String username);

	//查询管理员用户(姓名  模糊查询)
	@Select("select name, sex, username, userid, rgsttime, state from user_admin_view where name like CONCAT(CONCAT('%', #{name}), '%') order by rgsttime desc")
	List<ScsUser> findGlyByName(String name);

	//查询管理员用户(身份证号)
	@Select("select name, sex, username, userid, rgsttime, state from user_admin_view where userid = #{userid}")
	ScsUser findGlyByUserid(String userid);

	//新建管理员用户
	@Insert("insert into scs_admin(name, sex, userid, rgsttime) values"
			+ "(#{name,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, #{rgsttime})")
	void saveGly(ScsUser userEntity);

	//更新管理员用户
	@Update("update scs_admin set name = #{name,jdbcType=VARCHAR},sex = #{sex,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}")
	void updateGly(ScsUser userEntity);

	//查询管理员条数(性别)
	@Select("select count(*) from user_admin_view where sex = #{sex,jdbcType=VARCHAR}")
	int findSexGlyCount(String sex);

	//筛选管理员(性别)
	@Select("select name, sex, username, userid, rgsttime, state from user_admin_view where sex = #{sex,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findSexGly(String sex);

	//查询管理员条数(状态)
	@Select("select count(*) from user_admin_view where state = #{state,jdbcType=VARCHAR}")
	int findStateGlyCount(String state);

	//筛选管理员(状态)
	@Select("select name, sex, username, userid, rgsttime, state from user_admin_view where state = #{state,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findStateGly(String state);

	//删除管理员
	@Delete("delete from scs_admin where userid = #{userid,jdbcType=VARCHAR}")
	void deleteGly(String userid);

	/*
	 * 负责人操作
	 */
	//查询负责人条数(所有)
	@Select("select count(*) from user_head_view")
	int findFzrCount();

	//查询负责人条数 (用户名  模糊查询)
	@Select("select count(*) from user_head_view where username like CONCAT(CONCAT('%', #{username}), '%')")
	int findFzrCountByUsername(String username);

	//查询负责人条数(姓名  模糊查询)
	@Select("select count(*) from user_head_view where name like CONCAT(CONCAT('%', #{name}), '%')")
	int findFzrCountByName(String name);

	//查询负责人列表
	@Select("select name, sex, username, userid, rgsttime, state from user_head_view order by rgsttime desc")
	List<ScsUser> findAllFzr();

	//查询负责人用户(用户名)
	@Select("select name, sex, username, userid, rgsttime, state from user_head_view where username = #{username,jdbcType=VARCHAR}")
	ScsUser findFzrUsername(String username);

	//查询负责人用户(用户名  模糊查询)
	@Select("select name, sex, username, userid, rgsttime, state from user_head_view where username like CONCAT(CONCAT('%', #{username}), '%') order by rgsttime desc")
	List<ScsUser> findFzrByUsername(String username);

	//查询负责人用户(姓名  模糊查询)
	@Select("select name, sex, username, userid, rgsttime, state from user_head_view where name like CONCAT(CONCAT('%', #{name}), '%') order by rgsttime desc")
	List<ScsUser> findFzrByName(String name);

	//查询负责人用户(身份证号)
	@Select("select name, sex, username, userid, rgsttime, state from user_head_view where userid = #{userid}")
	ScsUser findFzrByUserid(String userid);

	//新建负责人用户
	@Insert("insert into scs_head(name, sex, userid, rgsttime) values"
			+ "(#{name,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, #{rgsttime})")
	void saveFzr(ScsUser userEntity);

	//更新负责人用户
	@Update("update scs_head set name = #{name,jdbcType=VARCHAR},sex = #{sex,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}")
	void updateFzr(ScsUser userEntity);

	//查询负责人条数(性别)
	@Select("select count(*) from user_head_view where sex = #{sex,jdbcType=VARCHAR}")
	int findSexFzrCount(String sex);

	//筛选负责人(性别)
	@Select("select name, sex, username, userid, rgsttime, state from user_head_view where sex = #{sex,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findSexFzr(String sex);

	//查询负责人条数(状态)
	@Select("select count(*) from user_head_view where state = #{state,jdbcType=VARCHAR}")
	int findStateFzrCount(String state);

	//筛选负责人(状态)
	@Select("select name, sex, username, userid, rgsttime, state from user_head_view where state = #{state,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findStateFzr(String state);

	//删除负责人
	@Delete("delete from scs_head where userid = #{userid,jdbcType=VARCHAR}")
	void deleteFzr(String userid);

	/*
	 * 验船师操作
	 */
	//查询验船师条数(所有)
	@Select("select count(*) from user_surveyor_view")
	int findYcsCount();

	//查询验船师条数(用户名  模糊查询)
	@Select("select count(*) from user_surveyor_view where username like CONCAT(CONCAT('%', #{username}), '%')")
	int findYcsCountByUsername(String username);

	//查询验船师条数 (姓名  模糊查询)
	@Select("select count(*) from user_surveyor_view where name like CONCAT(CONCAT('%', #{name}), '%')")
	int findYcsCountByName(String name);

	//查询验船师列表
	@Select("select name, sex, username, userid, rgsttime, ct, lj, dq, state from user_surveyor_view order by rgsttime desc")
	List<ScsUser> findAllYcs();

	//查询验船师用户(用户名)
	@Select("select name, sex, username, userid, rgsttime, ct, lj, dq, state from user_surveyor_view where username = #{username,jdbcType=VARCHAR}")
	ScsUser findYcsUsername(String username);

	//查询验船师用户(用户名  模糊查询)
	@Select("select name, sex, username, userid, rgsttime, ct, lj, dq, state from user_surveyor_view where username like CONCAT(CONCAT('%', #{username}), '%') order by rgsttime desc")
	List<ScsUser> findYcsByUsername(String username);

	//查询验船师用户(姓名  模糊查询)
	@Select("select name, sex, username, userid, rgsttime, ct, lj, dq, state from user_surveyor_view where name like CONCAT(CONCAT('%', #{name}), '%') order by rgsttime desc")
	List<ScsUser> findYcsByName(String name);

	//查询验船师用户(身份证号)
	@Select("select name, sex, username, userid, rgsttime, ct, lj, dq, state, work from user_surveyor_view where userid = #{userid,jdbcType=VARCHAR}")
	ScsUser findYcsByUserid(String userid);

	//验证船体验船师
	@Select("select * from user_surveyor_view where username = #{username,jdbcType=VARCHAR} and name = #{name,jdbcType=VARCHAR}")
	ScsUser validateYcs(@Param("username") String username, @Param("name") String name);

	//验证船体验船师
	@Select("select * from user_surveyor_view where username = #{username,jdbcType=VARCHAR} and name = #{name,jdbcType=VARCHAR} and ct = '船体'")
	ScsUser validateCtYcs(@Param("username") String username, @Param("name") String name);

	//验证轮机验船师
	@Select("select * from user_surveyor_view where username = #{username,jdbcType=VARCHAR} and name = #{name,jdbcType=VARCHAR} and lj = '轮机'")
	ScsUser validateLjYcs(@Param("username") String username, @Param("name") String name);

	//验证电气验船师
	@Select("select * from user_surveyor_view where username = #{username,jdbcType=VARCHAR} and name = #{name,jdbcType=VARCHAR} and dq = '电气'")
	ScsUser validateDqYcs(@Param("username") String username, @Param("name") String name);

	//新建验船师用户
	@Insert("insert into scs_surveyor(name, sex, userid, rgsttime, ct, lj, dq) values"
			+ "(#{name,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, #{rgsttime}, #{ct,jdbcType=VARCHAR}, #{lj,jdbcType=VARCHAR}, #{dq,jdbcType=VARCHAR})")
	void saveYcs(ScsUser userEntity);

	//更新验船师用户
	@Update("update scs_surveyor set name = #{name,jdbcType=VARCHAR},sex = #{sex,jdbcType=VARCHAR},ct = #{ct,jdbcType=VARCHAR},lj = #{lj,jdbcType=VARCHAR},dq = #{dq,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}")
	void updateYcs(ScsUser userEntity);

	//查询验船师条数(性别)
	@Select("select count(*) from user_surveyor_view where sex = #{sex,jdbcType=VARCHAR}")
	int findSexYcsCount(String sex);

	//筛选验船师(性别)
	@Select("select name, sex, username, userid, rgsttime, ct, lj, dq, state from user_surveyor_view where sex = #{sex,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findSexYcs(String sex);

	//查询验船师条数(船体)
	@Select("select count(*) from user_surveyor_view where ct = #{ct,jdbcType=VARCHAR}")
	int findCtYcsCount(String ct);

	//查询验船师条数(船体)
	@Select("select count(*) from user_surveyor_view where lj = #{lj,jdbcType=VARCHAR}")
	int findLjYcsCount(String lj);

	//查询验船师条数(船体)
	@Select("select count(*) from user_surveyor_view where dq = #{dq,jdbcType=VARCHAR}")
	int findDqYcsCount(String dq);

	//筛选验船师(船体)
	@Select("select name, sex, username, userid, rgsttime, ct, lj, dq, state from user_surveyor_view where ct = #{ct,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findCtYcs(String ct);

	//筛选验船师(轮机)
	@Select("select name, sex, username, userid, rgsttime, ct, lj, dq, state from user_surveyor_view where lj = #{lj,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findLjYcs(String lj);

	//筛选验船师(电气)
	@Select("select name, sex, username, userid, rgsttime, ct, lj, dq, state from user_surveyor_view where dq = #{dq,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findDqYcs(String dq);

	//查询验船师条数(状态)
	@Select("select count(*) from user_surveyor_view where state = #{state,jdbcType=VARCHAR}")
	int findStateYcsCount(String state);

	//筛选验船师(状态)
	@Select("select name, sex, username, userid, rgsttime, ct, lj, dq, state from user_surveyor_view where state = #{state,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findStateYcs(String state);

	//删除验船师
	@Delete("delete from scs_surveyor where userid = #{userid,jdbcType=VARCHAR}")
	void deleteYcs(String userid);

	//验船师参加项目
	@Update("update scs_surveyor set work = work+1 where userid = #{userid,jdbcType=VARCHAR}")
	void ycsJoinPro(String userid);

	//验船师退出项目
	@Update("update scs_surveyor set work = work-1 where userid = #{userid,jdbcType=VARCHAR}")
	void ycsQuitPro(String userid);


	/*
	 *  船厂操作
	 */
	//查询船厂条数(所有)
	@Select("select count(*) from user_shipyard_view")
	int findCcCount();

	//查询船厂条数 (用户名  模糊查询)
	@Select("select count(*) from user_shipyard_view where username like CONCAT(CONCAT('%', #{username}), '%')")
	int findCcCountByUsername(String username);

	//查询船厂条数(姓名  模糊查询)
	@Select("select count(*) from user_shipyard_view where name like CONCAT(CONCAT('%', #{name}), '%')")
	int findCcCountByName(String name);

	//查询船厂列表
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipyard_view order by rgsttime desc")
	List<ScsUser> findAllCc();

	//查询船厂用户(用户名)
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipyard_view where username = #{username}")
	ScsUser findCcUsername(String username);

	//查询船厂用户(用户名  模糊查询)
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipyard_view where username like CONCAT(CONCAT('%', #{username}), '%')")
	List<ScsUser> findCcByUsername(String username);

	//查询船厂用户(姓名  模糊查询)
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipyard_view where name like CONCAT(CONCAT('%', #{name}), '%')")
	List<ScsUser> findCcByName(String name);

	//查询船厂用户(身份证号)
	@Select("select name, sex, username, userid, rgsttime, coname, state, fax, zipcode, crecode, ccadr, writename, work from user_shipyard_view where userid = #{userid}")
	ScsUser findCcByUserid(String userid);

	//查询船厂用户(用户名)
	@Select("select name, sex, username, userid, rgsttime, coname, state, fax, zipcode, crecode, ccadr, writename from user_shipyard_view where username = #{username}")
	ScsUser findCcinfoByUsername(String username);

	//验证船厂用户
	@Select("select * from user_shipyard_view where username = #{username,jdbcType=VARCHAR} and name = #{name,jdbcType=VARCHAR}")
	ScsUser validateCc(@Param("username") String username, @Param("name") String name);

	//新建船厂用户
	@Insert("insert into scs_shipyard(name, sex, userid, rgsttime, coname, fax, zipcode, crecode, ccadr, writename) values"
			+ "(#{name,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, #{rgsttime}, #{coname,jdbcType=VARCHAR}," +
			" #{fax,jdbcType=VARCHAR}, #{zipcode,jdbcType=VARCHAR}, #{crecode,jdbcType=VARCHAR}, #{ccadr,jdbcType=VARCHAR}, #{writename,jdbcType=VARCHAR})")
	void saveCc(ScsUser userEntity);

	//更新船厂用户
	@Update("update scs_shipyard set name = #{name,jdbcType=VARCHAR},sex = #{sex,jdbcType=VARCHAR},coname = #{coname,jdbcType=VARCHAR},fax = #{fax,jdbcType=VARCHAR}," +
			"zipcode = #{zipcode,jdbcType=VARCHAR},crecode = #{crecode,jdbcType=VARCHAR},ccadr = #{ccadr,jdbcType=VARCHAR},writename = #{writename,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}")
	void updateCc(ScsUser userEntity);

	//查询船厂条数(性别)
	@Select("select count(*) from user_shipyard_view where sex = #{sex,jdbcType=VARCHAR}")
	int findSexCcCount(String sex);

	//筛选船厂(性别)
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipyard_view where sex = #{sex,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findSexCc(String sex);

	//查询船厂条数(状态)
	@Select("select count(*) from user_shipyard_view where state = #{state,jdbcType=VARCHAR}")
	int findStateCcCount(String state);

	//筛选船厂(状态)
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipyard_view where state = #{state,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findStateCc(String state);

	//查询船厂条数(企业名称)
	@Select("select count(*) from user_shipyard_view where coname like CONCAT(CONCAT('%', #{coname}), '%')")
	int findConameCcCount(String coname);

	//筛选船厂(企业名称 模糊查询)
	@Select("select name, sex, username, password, userid, rgsttime, coname, state from user_shipyard_view where coname like CONCAT(CONCAT('%', #{coname}), '%')")
	List<ScsUser> findConameCc(String coname);

	//删除船厂
	@Delete("delete from scs_shipyard where userid = #{userid,jdbcType=VARCHAR}")
	void deleteCc(String userid);

	//船厂参加项目
	@Update("update scs_shipyard set work = work+1 where userid = #{userid,jdbcType=VARCHAR}")
	void ccJoinPro(String userid);

	//船厂退出项目
	@Update("update scs_shipyard set work = work-1 where userid = #{userid,jdbcType=VARCHAR}")
	void ccQuitPro(String userid);


	/*
	 *  船东操作
	 */
	//查询船东条数(所有)
	@Select("select count(*) from user_shipowner_view")
	int findCdCount();

	//查询船东条数(用户名  模糊查询)
	@Select("select count(*) from user_shipowner_view where username like CONCAT(CONCAT('%', #{username}), '%')")
	int findCdCountByUsername(String username);

	//查询船东条数 (姓名  模糊查询)
	@Select("select count(*) from user_shipowner_view where name like CONCAT(CONCAT('%', #{name}), '%')")
	int findCdCountByName(String name);

	//查询船东列表
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipowner_view order by rgsttime desc")
	List<ScsUser> findAllCd();

	//查询船东用户(用户名)
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipowner_view where username = #{username,jdbcType=VARCHAR}")
	ScsUser findCdUsername(String username);

	//查询船东用户(用户名  模糊查询)
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipowner_view where username like CONCAT(CONCAT('%', #{username}), '%') order by rgsttime desc")
	List<ScsUser> findCdByUsername(String username);

	//查询船东用户(姓名  模糊查询)
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipowner_view where name like CONCAT(CONCAT('%', #{name}), '%') order by rgsttime desc")
	List<ScsUser> findCdByName(String name);

	//查询船东用户(身份证号)
	@Select("select name, sex, username, userid, rgsttime, coname, state, work from user_shipowner_view where userid = #{userid,jdbcType=VARCHAR}")
	ScsUser findCdByUserid(String userid);

	//验证船东
	@Select("select * from user_shipowner_view where username = #{username,jdbcType=VARCHAR} and name = #{name,jdbcType=VARCHAR}")
	ScsUser validateCd(@Param("username") String username, @Param("name") String name);

	//新建船东用户
	@Insert("insert into scs_shipowner(name, sex, userid, rgsttime, coname) values"
			+ "(#{name,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, #{rgsttime}, #{coname,jdbcType=VARCHAR})")
	void saveCd(ScsUser userEntity);

	//更新船东用户
	@Update("update scs_shipowner set name = #{name,jdbcType=VARCHAR},sex = #{sex,jdbcType=VARCHAR},coname = #{coname,jdbcType=VARCHAR} where userid = #{userid,jdbcType=VARCHAR}")
	void updateCd(ScsUser userEntity);

	//查询船东条数(性别)
	@Select("select count(*) from user_shipowner_view where sex = #{sex,jdbcType=VARCHAR}")
	int findSexCdCount(String sex);

	//筛选船东(性别)
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipowner_view where sex = #{sex,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findSexCd(String sex);

	//查询船东条数(状态)
	@Select("select count(*) from user_shipowner_view where state = #{state,jdbcType=VARCHAR}")
	int findStateCdCount(String state);

	//筛选船东(状态)
	@Select("select name, sex, username, userid, rgsttime, coname, state from user_shipowner_view where state = #{state,jdbcType=VARCHAR} order by rgsttime desc")
	List<ScsUser> findStateCd(String state);

	//删除船东
	@Delete("delete from scs_shipowner where userid = #{userid,jdbcType=VARCHAR}")
	void deleteCd(String userid);

	//船东参加项目
	@Update("update scs_shipowner set work = work+1 where userid = #{userid,jdbcType=VARCHAR}")
	void cdJoinPro(String userid);

	//船东退出项目
	@Update("update scs_shipowner set work = work-1 where userid = #{userid,jdbcType=VARCHAR}")
	void cdQuitPro(String userid);

}